package com.happy.seatwork;

import java.util.Scanner;

public class grass_boat01 {
    public static void main(String args[])
    {
        int sum, grass = 20, boat = 16;
        int grass_life = 30, boat_life = 20;
        int num1, num2, sum_life;
        Scanner scanner = new Scanner (System.in);
        System.out.println("请输入您的金币数量：");
        sum = (scanner.nextInt());
        num1 = sum / grass;
        num2 = (sum - grass * num1) / boat;
        sum_life = num1 * grass_life + num2 * boat_life;
        System.out.printf("仙女草购买数量为%d个，银河梭购买数量为%d个，增加的生命力为%d", num1, num2, sum_life);
    }
}
